home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 7305 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  896 b 

  1. Path: ram.tiac.net!user
  2. From: ram@tiac.net (robert a. moeser)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: Tradition or what?
  5. Date: Wed, 14 Feb 1996 20:10:53 -0500
  6. Organization: disorganized
  7. Message-ID: <ram-1402962010530001@ram.tiac.net>
  8. References: <1996Feb13.115611.73989@cc.usu.edu>
  9. NNTP-Posting-Host: ram.tiac.net
  10.  
  11. In article <1996Feb13.115611.73989@cc.usu.edu>, erik@cc.usu.edu (Erik van
  12. Renselaar) wrote:
  13.  
  14. > Can anyone tell me what the use is of returning
  15. > the same value for the function and one of the
  16. > output parameters, like it is done in strcpy?
  17. > Why return a string for the function if the 
  18. > result is in its first parameter as well?
  19.  
  20. it can be handy when the result of the application of
  21. a function is to be used as an argument in another
  22. function call.
  23.  
  24. like
  25.  
  26.     i = strlen(strcat(strcpy(tempName, rawName), ".dat"));
  27.  
  28. which i don't especially care for, but you see the idea.
  29.  
  30. -- rob
  31.